#include <bits/stdc++.h>
using namespace std;

int a,b,c,d;

int main(){
    freopen("arena.in","r",stdin);
    freopen("arena.out","W",stdout);
    scanf("%d%d" ,&a ,&b);
    for(int i = 1;i <= a;i++){
        scanf("%d" ,&d);
        c = max(d,c);
    }
    printf("%d" ,c);
    return 0;
}
